<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" >
<head>
    <title>我的电子票</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1 , user-scalable=no">
    <script src="/js/jquery.js"></script>
    <script src="/js/qrcode.min.js"></script>
    <script>
        var width=[[${width}]];
        var height=[[${height}]];
        var x=[[${x}]];
        var y=[[${y}]];
        var size=[[${size}]];

        $(function () {
            $("body").css('height', ($(window).width() / width * height) + "px");
            $("footer").css({ "position": "absolute", "top":$(window).width() / width*  y , "left": $(window).width() / width * x });
            if([[${isPass}]]){
                $("#qrcode").html("<h4 style='color:red'>该电子票已经使用</h4>")
            }else{
             var qrcode = new QRCode("qrcode", {
              text: "[[${idnumber}]]",
              width: $(window).width() / width * size,
              height: $(window).width() / width * size,
              colorDark : "#000000",
              colorLight : "#ffffff",
              correctLevel : QRCode.CorrectLevel.H
              });
           }
        })
        
        setTimeout( function () { location.reload(); },10000)
    </script>
    <style>
        
        * {
            padding: 0;
            margin: 0;
        }

        body {
            background: url([[${bg}]]) no-repeat;
            background-size: cover;
        }
        #qrcode{
            background-size:cover
        }
        
    </style>
</head>
<body>
    <footer id="qrcode" ></footer>
</body>
</html>